package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstUserInfoDTO;
import com.financing.wap.dao.IDstUserInfoDao;
import com.financing.wap.common.SqlName;
/**
 * dst_user_info  
 * 用户表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstUserInfoDao")
public class DstUserInfoDaoImpl extends BaseDaoImpl<DstUserInfoDTO, java.lang.Integer> implements IDstUserInfoDao {


	@Override
	public int insert(DstUserInfoDTO dstUserInfo) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstUserInfoSql.insert, dstUserInfo);
	}

	@Override
	public void update(DstUserInfoDTO dstUserInfo) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserInfoSql.update, dstUserInfo);
	}

	@Override
	public void updateForce(DstUserInfoDTO dstUserInfo) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserInfoSql.updateForce, dstUserInfo);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstUserInfoSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstUserInfoDTO> queryList(DstUserInfoDTO dstUserInfo) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstUserInfoSql.queryList, dstUserInfo);
	}

	@Override
	public int queryListCount(DstUserInfoDTO dstUserInfo) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstUserInfoSql.queryListCount, dstUserInfo);
	}

	@Override
	public DstUserInfoDTO loadById(Integer id) throws SQLException {
		return  (DstUserInfoDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstUserInfoSql.loadById,id);
	}

	@Override
	public Class<DstUserInfoDTO> getEntityClass() {
		return DstUserInfoDTO.class;
	}
 	
}
